<!--The whole content below can be removed with the new code.-->
<div *ngIf="loginInfo.disconnect">
    <h1>
        服务器断开啦！请耐心等待......
    </h1>
</div>

<div class="chat-room-wrapper" *ngIf="loginInfo.hasLogined">
    <div class="online panel panel-success">
        <div class="panel-heading">
            <h3 class="panel-title">在线<span class="user-number">{{users.length-1}}</span></h3>
        </div>

        <app-user [loginInfo]="loginInfo" [users]='users' (setReceiver)='setReceiver($event)'>

        </app-user>
    </div>

    <div class="chat-room panel panel-success">
        <div class="panel-heading">
            <h3 class="panel-title">{{receiver.nickname?receiver.nickname:"群聊"}}</h3>
        </div>
        <div id="test" class="message-wrapper panel-body">

            <app-message [loginInfo]="loginInfo" [messages]="messages" (onMessageClicked)="onMessageClicked($event)">

            </app-message>

        </div>


        <div class="panel-footer">

            <form class="post-form form-inline " novalidate name="postform"
                  (submit)="postMessage()">
                <input [(ngModel)]="say.words" name="say" id="test111" type="text" class="form-control"
                       placeholder="说点啥？在这里输入" required
                       data-emojiable="true">
                <button [disabled]="!say.words"  type="submit" class="btn btn-success">发送
                </button>
            </form>

        </div>
    </div>
</div>

<app-login-form  *ngIf="!loginInfo.hasLogined" (login)="login($event)">

</app-login-form>

